package org.linlinjava.litemall.wx.util;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author zhy
 * @date 2019-07-08 11:20
 **/
@Component
public class CreateSn {
	public String createSn(){
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
		Date date = new Date();
		String dateStr = sdf.format(date);
		String res = (int)Math.ceil(Math.random() * 1000) + "";
		return dateStr + res;
	}
}
